package com.fancon.book.soixich;

import java.util.Timer;
import java.util.TimerTask;

import android.content.Intent;
import android.os.Bundle;

public class SflashActivity extends BaseActivity {
	private static final long DELAY = 3000;
	private boolean scheduled = false;
	private Timer splashTimer;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash);

		splashTimer = new Timer();
		splashTimer.schedule(new TimerTask() {
			@Override
			public void run() {
				SflashActivity.this.finish();
				startActivity(new Intent(SflashActivity.this,
						FanconBookActivity.class));
			}
		}, DELAY);
		scheduled = true;
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		if (scheduled)
			splashTimer.cancel();
		splashTimer.purge();
	}
}